const items = require('./items.json');
const fs = require('fs');

let newList = [];
items.forEach(item => {
  const newLocalizedNames = {
    LocalizationNameVariable: item.LocalizationNameVariable,
    LocalizationDescriptionVariable: item.LocalizationDescriptionVariable,
  };
  if (item.LocalizedNames && item.LocalizedNames['ZH-CN']) {
    newLocalizedNames.LocalizedNames = item.LocalizedNames['ZH-CN']
  }
  newList.push(newLocalizedNames);
})

fs.writeFileSync('./newItems.json', JSON.stringify(newList, null, 2));